﻿#region zh-CHS 2006 - 2008 DemoSoft 团队 | en 2006 - 2008 DemoSoft Team

//     NOTES
// ---------------
//
// This file is a part of the MMOSE(Massively Multiplayer Online Server Engine) for .NET.
//
//                              2006-2008 DemoSoft Team
//
//
// First Version : by H.Q.Cai - mailto:caihuanqing@hotmail.com

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published
 *   by the Free Software Foundation; either version 2.1 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

#region zh-CHS 包含名字空间 | en Include namespace
using System;
using System.Threading;
using Demo.Mmose.Core.Entity.Item;
using Demo.Mmose.Core.Entity.Suit.Treasure;
using Demo.Mmose.Core.Util;
#endregion

namespace Demo.Mmose.Core.Entity.Creature
{
    /// <summary>
    /// BaseMobile Delta
    /// </summary>
    public class BaseCreatureState
    {
        #region zh-CHS 共有属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateName = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateName
        {
            get { return m_UpdateName; }
            internal set { m_UpdateName = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateCreatureTemplate = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateCreatureTemplate
        {
            get { return m_UpdateCreatureTemplate; }
            internal set { m_UpdateCreatureTemplate = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateLoots = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateLoots
        {
            get { return m_UpdateLoots; }
            internal set { m_UpdateLoots = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_UpdateGoldLoots = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsUpdateGoldLoots
        {
            get { return m_UpdateGoldLoots; }
            internal set { m_UpdateGoldLoots = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_DeathCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsDeathCall
        {
            get { return m_DeathCall; }
            internal set { m_DeathCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_RevivalCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsRevivalCall
        {
            get { return m_RevivalCall; }
            internal set { m_RevivalCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_AddItemCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsAddItemCall
        {
            get { return m_AddItemCall; }
            internal set { m_AddItemCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_RemoveItemCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsRemoveItemCall
        {
            get { return m_RemoveItemCall; }
            internal set { m_RemoveItemCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_AddFriendCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsAddFriendCall
        {
            get { return m_AddFriendCall; }
            internal set { m_AddFriendCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_RemoveFriendCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsRemoveFriendCall
        {
            get { return m_RemoveFriendCall; }
            internal set { m_RemoveFriendCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_AddGroupCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsAddGroupCall
        {
            get { return m_AddGroupCall; }
            internal set { m_AddGroupCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_RemoveGroupCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsRemoveGroupCall
        {
            get { return m_RemoveGroupCall; }
            internal set { m_RemoveGroupCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_AddPartyCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsAddPartyCall
        {
            get { return m_AddPartyCall; }
            internal set { m_AddPartyCall = value; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private bool m_RemovePartyCall = false;
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public bool IsRemovePartyCall
        {
            get { return m_RemovePartyCall; }
            internal set { m_RemovePartyCall = value; }
        }
        #endregion

        #region zh-CHS 共有方法 | en Public Methods

        /// <summary>
        /// 
        /// </summary>
        internal void RestoreAll()
        {
            m_UpdateName = false;
            m_UpdateCreatureTemplate = false;
            m_UpdateLoots = false;
            m_UpdateGoldLoots = false;
            m_DeathCall = false;
            m_RevivalCall = false;
            m_AddItemCall = false;
            m_RemoveItemCall = false;
            m_AddFriendCall = false;
            m_RemoveFriendCall = false;
            m_AddGroupCall = false;
            m_RemoveGroupCall = false;
            m_AddPartyCall = false;
            m_RemovePartyCall = false;
        }
        #endregion

        #region zh-CHS 内部的事件处理函数 | en Internal Event Handlers

        #region zh-CHS Name事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeUpdateName( string strName, BaseCreature creature )
        {
            EventHandler<BeforeUpdateNameEventArgs> tempBeforeEventArgs = m_EventBeforeUpdateName;
            if ( tempBeforeEventArgs != null )
            {
                BeforeUpdateNameEventArgs eventArgs = new BeforeUpdateNameEventArgs( strName, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterUpdateName( string strName, BaseCreature creature )
        {
            EventHandler<AfterUpdateNameEventArgs> tempAfterEventArgs = m_EventAfterUpdateName;
            if ( tempAfterEventArgs != null )
            {
                AfterUpdateNameEventArgs eventArgs = new AfterUpdateNameEventArgs( strName, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS CreatureTemplate事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeUpdateCreatureTemplate( BaseCreatureTemplate creatureTemplate, BaseCreature creature )
        {
            EventHandler<BeforeUpdateCreatureTemplateEventArgs> tempBeforeEventArgs = m_EventBeforeUpdateCreatureTemplate;
            if ( tempBeforeEventArgs != null )
            {
                BeforeUpdateCreatureTemplateEventArgs eventArgs = new BeforeUpdateCreatureTemplateEventArgs( creatureTemplate, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterUpdateCreatureTemplate( BaseCreatureTemplate creatureTemplate, BaseCreature creature )
        {
            EventHandler<AfterUpdateCreatureTemplateEventArgs> tempAfterEventArgs = m_EventAfterUpdateCreatureTemplate;
            if ( tempAfterEventArgs != null )
            {
                AfterUpdateCreatureTemplateEventArgs eventArgs = new AfterUpdateCreatureTemplateEventArgs( creatureTemplate, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS Loots事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeUpdateLoots( OneTreasure[] loots, BaseCreature creature )
        {
            EventHandler<BeforeUpdateLootsEventArgs> tempBeforeEventArgs = m_EventBeforeUpdateLoots;
            if ( tempBeforeEventArgs != null )
            {
                BeforeUpdateLootsEventArgs eventArgs = new BeforeUpdateLootsEventArgs( loots, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterUpdateLoots( OneTreasure[] loots, BaseCreature creature )
        {
            EventHandler<AfterUpdateLootsEventArgs> tempAfterEventArgs = m_EventAfterUpdateLoots;
            if ( tempAfterEventArgs != null )
            {
                AfterUpdateLootsEventArgs eventArgs = new AfterUpdateLootsEventArgs( loots, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS GoldLoots事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeUpdateGoldLoots( OneTreasure[] goldLoots, BaseCreature creature )
        {
            EventHandler<BeforeUpdateGoldLootsEventArgs> tempBeforeEventArgs = m_EventBeforeUpdateGoldLoots;
            if ( tempBeforeEventArgs != null )
            {
                BeforeUpdateGoldLootsEventArgs eventArgs = new BeforeUpdateGoldLootsEventArgs( goldLoots, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterUpdateGoldLoots( OneTreasure[] goldLoots, BaseCreature creature )
        {
            EventHandler<AfterUpdateGoldLootsEventArgs> tempAfterEventArgs = m_EventAfterUpdateGoldLoots;
            if ( tempAfterEventArgs != null )
            {
                AfterUpdateGoldLootsEventArgs eventArgs = new AfterUpdateGoldLootsEventArgs( goldLoots, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS DeathCall事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeDeathCall( BaseCreature creatureKiller, BaseCreature creature )
        {
            EventHandler<BeforeDeathCallEventArgs> tempBeforeEventArgs = m_EventBeforeDeathCall;
            if ( tempBeforeEventArgs != null )
            {
                BeforeDeathCallEventArgs eventArgs = new BeforeDeathCallEventArgs( creatureKiller, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterDeathCall( BaseCreature creatureKiller, BaseCreature creature )
        {
            EventHandler<AfterDeathCallEventArgs> tempAfterEventArgs = m_EventAfterDeathCall;
            if ( tempAfterEventArgs != null )
            {
                AfterDeathCallEventArgs eventArgs = new AfterDeathCallEventArgs( creatureKiller, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS RevivalCall事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeRevivalCall( BaseCreature creatureRevival, BaseCreature creature )
        {
            EventHandler<BeforeRevivalCallEventArgs> tempBeforeEventArgs = m_EventBeforeRevivalCall;
            if ( tempBeforeEventArgs != null )
            {
                BeforeRevivalCallEventArgs eventArgs = new BeforeRevivalCallEventArgs( creatureRevival, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterRevivalCall( BaseCreature creatureRevival, BaseCreature creature )
        {
            EventHandler<AfterRevivalCallEventArgs> tempAfterEventArgs = m_EventAfterRevivalCall;
            if ( tempAfterEventArgs != null )
            {
                AfterRevivalCallEventArgs eventArgs = new AfterRevivalCallEventArgs( creatureRevival, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS AddItem事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeAddItem( BaseItem addItem, BaseCreature creature )
        {
            EventHandler<BeforeAddItemCallEventArgs> tempBeforeEventArgs = m_EventBeforeAddItem;
            if ( tempBeforeEventArgs != null )
            {
                BeforeAddItemCallEventArgs eventArgs = new BeforeAddItemCallEventArgs( addItem, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterAddItem( BaseItem addItem, BaseCreature creature )
        {
            EventHandler<AfterAddItemCallEventArgs> tempAfterEventArgs = m_EventAfterAddItem;
            if ( tempAfterEventArgs != null )
            {
                AfterAddItemCallEventArgs eventArgs = new AfterAddItemCallEventArgs( addItem, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS RemoveItem事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeRemoveItem( BaseItem removeItem, BaseCreature creature )
        {
            EventHandler<BeforeRemoveItemCallEventArgs> tempBeforeEventArgs = m_EventBeforeRemoveItem;
            if ( tempBeforeEventArgs != null )
            {
                BeforeRemoveItemCallEventArgs eventArgs = new BeforeRemoveItemCallEventArgs( removeItem, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterRemoveItem( BaseItem removeItem, BaseCreature creature )
        {
            EventHandler<AfterRemoveItemCallEventArgs> tempAfterEventArgs = m_EventAfterRemoveItem;
            if ( tempAfterEventArgs != null )
            {
                AfterRemoveItemCallEventArgs eventArgs = new AfterRemoveItemCallEventArgs( removeItem, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS AddFriend事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeAddFriend( BaseCreature creatureFriend, BaseCreature creature )
        {
            EventHandler<BeforeAddFriendCallEventArgs> tempBeforeEventArgs = m_EventBeforeAddFriend;
            if ( tempBeforeEventArgs != null )
            {
                BeforeAddFriendCallEventArgs eventArgs = new BeforeAddFriendCallEventArgs( creatureFriend, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterAddFriend( BaseCreature creatureFriend, BaseCreature creature )
        {
            EventHandler<AfterAddFriendCallEventArgs> tempAfterEventArgs = m_EventAfterAddFriend;
            if ( tempAfterEventArgs != null )
            {
                AfterAddFriendCallEventArgs eventArgs = new AfterAddFriendCallEventArgs( creatureFriend, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS RemoveFriend事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeRemoveFriend( BaseCreature creatureFriend, BaseCreature creature )
        {
            EventHandler<BeforeRemoveFriendCallEventArgs> tempBeforeEventArgs = m_EventBeforeRemoveFriend;
            if ( tempBeforeEventArgs != null )
            {
                BeforeRemoveFriendCallEventArgs eventArgs = new BeforeRemoveFriendCallEventArgs( creatureFriend, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterRemoveFriend( BaseCreature creatureFriend, BaseCreature creature )
        {
            EventHandler<AfterRemoveFriendCallEventArgs> tempAfterEventArgs = m_EventAfterRemoveFriend;
            if ( tempAfterEventArgs != null )
            {
                AfterRemoveFriendCallEventArgs eventArgs = new AfterRemoveFriendCallEventArgs( creatureFriend, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS AddGroup事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeAddGroup( BaseCreature creatureGroup, BaseCreature creature )
        {
            EventHandler<BeforeAddGroupCallEventArgs> tempBeforeEventArgs = m_EventBeforeAddGroup;
            if ( tempBeforeEventArgs != null )
            {
                BeforeAddGroupCallEventArgs eventArgs = new BeforeAddGroupCallEventArgs( creatureGroup, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterAddGroup( BaseCreature creatureGroup, BaseCreature creature )
        {
            EventHandler<AfterAddGroupCallEventArgs> tempAfterEventArgs = m_EventAfterAddGroup;
            if ( tempAfterEventArgs != null )
            {
                AfterAddGroupCallEventArgs eventArgs = new AfterAddGroupCallEventArgs( creatureGroup, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS RemoveGroup事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeRemoveGroup( BaseCreature creatureGroup, BaseCreature creature )
        {
            EventHandler<BeforeRemoveGroupCallEventArgs> tempBeforeEventArgs = m_EventBeforeRemoveGroup;
            if ( tempBeforeEventArgs != null )
            {
                BeforeRemoveGroupCallEventArgs eventArgs = new BeforeRemoveGroupCallEventArgs( creatureGroup, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterRemoveGroup( BaseCreature creatureGroup, BaseCreature creature )
        {
            EventHandler<AfterRemoveGroupCallEventArgs> tempAfterEventArgs = m_EventAfterRemoveGroup;
            if ( tempAfterEventArgs != null )
            {
                AfterRemoveGroupCallEventArgs eventArgs = new AfterRemoveGroupCallEventArgs( creatureGroup, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS AddParty事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeAddParty( BaseCreature creatureParty, BaseCreature creature )
        {
            EventHandler<BeforeAddPartyCallEventArgs> tempBeforeEventArgs = m_EventBeforeAddParty;
            if ( tempBeforeEventArgs != null )
            {
                BeforeAddPartyCallEventArgs eventArgs = new BeforeAddPartyCallEventArgs( creatureParty, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterAddParty( BaseCreature creatureParty, BaseCreature creature )
        {
            EventHandler<AfterAddPartyCallEventArgs> tempAfterEventArgs = m_EventAfterAddParty;
            if ( tempAfterEventArgs != null )
            {
                AfterAddPartyCallEventArgs eventArgs = new AfterAddPartyCallEventArgs( creatureParty, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #region zh-CHS RemoveParty事件 | en Public Event
        /// <summary>
        /// 
        /// </summary>
        internal bool OnBeforeRemoveParty( BaseCreature creatureParty, BaseCreature creature )
        {
            EventHandler<BeforeRemovePartyCallEventArgs> tempBeforeEventArgs = m_EventBeforeRemoveParty;
            if ( tempBeforeEventArgs != null )
            {
                BeforeRemovePartyCallEventArgs eventArgs = new BeforeRemovePartyCallEventArgs( creatureParty, creature );
                tempBeforeEventArgs( this, eventArgs );

                return eventArgs.IsCancel;
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        internal void OnAfterRemoveParty( BaseCreature creatureParty, BaseCreature creature )
        {
            EventHandler<AfterRemovePartyCallEventArgs> tempAfterEventArgs = m_EventAfterRemoveParty;
            if ( tempAfterEventArgs != null )
            {
                AfterRemovePartyCallEventArgs eventArgs = new AfterRemovePartyCallEventArgs( creatureParty, creature );
                tempAfterEventArgs( this, eventArgs );
            }
        }
        #endregion

        #endregion

        #region zh-CHS 共有事件 | en Public Event

        #region zh-CHS Name事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeUpdateNameEventArgs> m_EventBeforeUpdateName;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeUpdateName = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeUpdateNameEventArgs> BeforeUpdateName
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateName );
                {
                    m_EventBeforeUpdateName += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateName );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateName );
                {
                    m_EventBeforeUpdateName -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateName );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterUpdateNameEventArgs> m_EventAfterUpdateName;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterUpdateName = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterUpdateNameEventArgs> AfterUpdateName
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateName );
                {
                    m_EventAfterUpdateName += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateName );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateName );
                {
                    m_EventAfterUpdateName -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateName );
            }
        }
        #endregion

        #region zh-CHS CreatureTemplate事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeUpdateCreatureTemplateEventArgs> m_EventBeforeUpdateCreatureTemplate;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeUpdateCreatureTemplate = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeUpdateCreatureTemplateEventArgs> BeforeUpdateCreatureTemplate
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateCreatureTemplate );
                {
                    m_EventBeforeUpdateCreatureTemplate += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateCreatureTemplate );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateCreatureTemplate );
                {
                    m_EventBeforeUpdateCreatureTemplate -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateCreatureTemplate );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterUpdateCreatureTemplateEventArgs> m_EventAfterUpdateCreatureTemplate;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterUpdateCreatureTemplate = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterUpdateCreatureTemplateEventArgs> AfterUpdateCreatureTemplate
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateCreatureTemplate );
                {
                    m_EventAfterUpdateCreatureTemplate += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateCreatureTemplate );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateCreatureTemplate );
                {
                    m_EventAfterUpdateCreatureTemplate -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateCreatureTemplate );
            }
        }
        #endregion

        #region zh-CHS Loots事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeUpdateLootsEventArgs> m_EventBeforeUpdateLoots;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeUpdateLoots = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeUpdateLootsEventArgs> BeforeUpdateLoots
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateLoots );
                {
                    m_EventBeforeUpdateLoots += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateLoots );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateLoots );
                {
                    m_EventBeforeUpdateLoots -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateLoots );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterUpdateLootsEventArgs> m_EventAfterUpdateLoots;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterUpdateLoots = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterUpdateLootsEventArgs> AfterUpdateLoots
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateLoots );
                {
                    m_EventAfterUpdateLoots += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateLoots );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateLoots );
                {
                    m_EventAfterUpdateLoots -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateLoots );
            }
        }
        #endregion

        #region zh-CHS GoldLoots事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeUpdateGoldLootsEventArgs> m_EventBeforeUpdateGoldLoots;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeUpdateGoldLoots = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeUpdateGoldLootsEventArgs> BeforeUpdateGoldLoots
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateGoldLoots );
                {
                    m_EventBeforeUpdateGoldLoots += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateGoldLoots );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeUpdateGoldLoots );
                {
                    m_EventBeforeUpdateGoldLoots -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeUpdateGoldLoots );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterUpdateGoldLootsEventArgs> m_EventAfterUpdateGoldLoots;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterUpdateGoldLoots = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterUpdateGoldLootsEventArgs> AfterUpdateGoldLoots
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateGoldLoots );
                {
                    m_EventAfterUpdateGoldLoots += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateGoldLoots );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterUpdateGoldLoots );
                {
                    m_EventAfterUpdateGoldLoots -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterUpdateGoldLoots );
            }
        }
        #endregion

        #region zh-CHS DeathCall事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeDeathCallEventArgs> m_EventBeforeDeathCall;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeDeathCall = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeDeathCallEventArgs> BeforeDeathCall
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeDeathCall );
                {
                    m_EventBeforeDeathCall += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeDeathCall );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeDeathCall );
                {
                    m_EventBeforeDeathCall -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeDeathCall );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterDeathCallEventArgs> m_EventAfterDeathCall;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterDeathCall = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterDeathCallEventArgs> AfterDeathCall
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterDeathCall );
                {
                    m_EventAfterDeathCall += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterDeathCall );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterDeathCall );
                {
                    m_EventAfterDeathCall -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterDeathCall );
            }
        }
        #endregion

        #region zh-CHS RevivalCall事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeRevivalCallEventArgs> m_EventBeforeRevivalCall;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeRevivalCall = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeRevivalCallEventArgs> BeforeRevivalCall
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRevivalCall );
                {
                    m_EventBeforeRevivalCall += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRevivalCall );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRevivalCall );
                {
                    m_EventBeforeRevivalCall -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRevivalCall );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterRevivalCallEventArgs> m_EventAfterRevivalCall;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterRevivalCall = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterRevivalCallEventArgs> AfterRevivalCall
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRevivalCall );
                {
                    m_EventAfterRevivalCall += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRevivalCall );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRevivalCall );
                {
                    m_EventAfterRevivalCall -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRevivalCall );
            }
        }
        #endregion

        #region zh-CHS AddItem事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeAddItemCallEventArgs> m_EventBeforeAddItem;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeAddItem = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeAddItemCallEventArgs> BeforeAddItem
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddItem );
                {
                    m_EventBeforeAddItem += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddItem );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddItem );
                {
                    m_EventBeforeAddItem -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddItem );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterAddItemCallEventArgs> m_EventAfterAddItem;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterAddItem = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterAddItemCallEventArgs> AfterAddItem
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddItem );
                {
                    m_EventAfterAddItem += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddItem );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddItem );
                {
                    m_EventAfterAddItem -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddItem );
            }
        }
        #endregion

        #region zh-CHS RemoveItem事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeRemoveItemCallEventArgs> m_EventBeforeRemoveItem;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeRemoveItem = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeRemoveItemCallEventArgs> BeforeRemoveItem
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveItem );
                {
                    m_EventBeforeRemoveItem += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveItem );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveItem );
                {
                    m_EventBeforeRemoveItem -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveItem );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterRemoveItemCallEventArgs> m_EventAfterRemoveItem;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterRemoveItem = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterRemoveItemCallEventArgs> AfterRemoveItem
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveItem );
                {
                    m_EventAfterRemoveItem += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveItem );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveItem );
                {
                    m_EventAfterRemoveItem -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveItem );
            }
        }
        #endregion

        #region zh-CHS AddFriend事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeAddFriendCallEventArgs> m_EventBeforeAddFriend;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeAddFriend = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeAddFriendCallEventArgs> BeforeAddFriend
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddFriend );
                {
                    m_EventBeforeAddFriend += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddFriend );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddFriend );
                {
                    m_EventBeforeAddFriend -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddFriend );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterAddFriendCallEventArgs> m_EventAfterAddFriend;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterAddFriend = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterAddFriendCallEventArgs> AfterAddFriend
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddFriend );
                {
                    m_EventAfterAddFriend += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddFriend );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddFriend );
                {
                    m_EventAfterAddFriend -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddFriend );
            }
        }
        #endregion

        #region zh-CHS RemoveFriend事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeRemoveFriendCallEventArgs> m_EventBeforeRemoveFriend;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeRemoveFriend = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeRemoveFriendCallEventArgs> BeforeRemoveFriend
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveFriend );
                {
                    m_EventBeforeRemoveFriend += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveFriend );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveFriend );
                {
                    m_EventBeforeRemoveFriend -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveFriend );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterRemoveFriendCallEventArgs> m_EventAfterRemoveFriend;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterRemoveFriend = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterRemoveFriendCallEventArgs> AfterRemoveFriend
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveFriend );
                {
                    m_EventAfterRemoveFriend += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveFriend );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveFriend );
                {
                    m_EventAfterRemoveFriend -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveFriend );
            }
        }
        #endregion

        #region zh-CHS AddGroup事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeAddGroupCallEventArgs> m_EventBeforeAddGroup;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeAddGroup = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeAddGroupCallEventArgs> BeforeAddGroup
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddGroup );
                {
                    m_EventBeforeAddGroup += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddGroup );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddGroup );
                {
                    m_EventBeforeAddGroup -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddGroup );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterAddGroupCallEventArgs> m_EventAfterAddGroup;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterAddGroup = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterAddGroupCallEventArgs> AfterAddGroup
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddGroup );
                {
                    m_EventAfterAddGroup += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddGroup );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddGroup );
                {
                    m_EventAfterAddGroup -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddGroup );
            }
        }
        #endregion

        #region zh-CHS RemoveGroup事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeRemoveGroupCallEventArgs> m_EventBeforeRemoveGroup;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeRemoveGroup = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeRemoveGroupCallEventArgs> BeforeRemoveGroup
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveGroup );
                {
                    m_EventBeforeRemoveGroup += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveGroup );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveGroup );
                {
                    m_EventBeforeRemoveGroup -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveGroup );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterRemoveGroupCallEventArgs> m_EventAfterRemoveGroup;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterRemoveGroup = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterRemoveGroupCallEventArgs> AfterRemoveGroup
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveGroup );
                {
                    m_EventAfterRemoveGroup += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveGroup );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveGroup );
                {
                    m_EventAfterRemoveGroup -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveGroup );
            }
        }
        #endregion

        #region zh-CHS AddParty事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeAddPartyCallEventArgs> m_EventBeforeAddParty;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeAddParty = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeAddPartyCallEventArgs> BeforeAddParty
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddParty );
                {
                    m_EventBeforeAddParty += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddParty );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeAddParty );
                {
                    m_EventBeforeAddParty -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeAddParty );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterAddPartyCallEventArgs> m_EventAfterAddParty;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterAddParty = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterAddPartyCallEventArgs> AfterAddParty
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddParty );
                {
                    m_EventAfterAddParty += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddParty );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterAddParty );
                {
                    m_EventAfterAddParty -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterAddParty );
            }
        }
        #endregion

        #region zh-CHS RemoveParty事件 | en Public Event
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<BeforeRemovePartyCallEventArgs> m_EventBeforeRemoveParty;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventBeforeRemoveParty = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<BeforeRemovePartyCallEventArgs> BeforeRemoveParty
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveParty );
                {
                    m_EventBeforeRemoveParty += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveParty );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventBeforeRemoveParty );
                {
                    m_EventBeforeRemoveParty -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventBeforeRemoveParty );
            }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private EventHandler<AfterRemovePartyCallEventArgs> m_EventAfterRemoveParty;
        /// <summary>
        /// 
        /// </summary>
        private ReaderWriterLockSlim m_LockEventAfterRemoveParty = new ReaderWriterLockSlim();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public event EventHandler<AfterRemovePartyCallEventArgs> AfterRemoveParty
        {
            add
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveParty );
                {
                    m_EventAfterRemoveParty += value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveParty );
            }
            remove
            {
                ReaderWriterLockSlimEx.EnterWriteLock( m_LockEventAfterRemoveParty );
                {
                    m_EventAfterRemoveParty -= value;
                }
                ReaderWriterLockSlimEx.ExitWriteLock( m_LockEventAfterRemoveParty );
            }
        }
        #endregion

        #endregion
    }
}
#endregion

